class Document < ActiveRecord::Base
  DOCUMENT_TYPES = [ "book", "newspaper", "magazine", "CD/DVD" ]
  
  validates :isbn, :name, :author, :description, :number, :document_type, :presence => true
  validates :isbn, :uniqueness => true
  validates :number, :numericality => {:greater_than_or_equal_to => 1} 
end
